﻿@using TSites.Administrator.Extensions
@model TSites.Administrator.Models.UserAddViewModel
@{
    ViewBag.Title = "Add User";
}
<link href="@Url.Stylesheet("jquery.ui.all.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Script("jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Script("jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Script("jquery.ui.core.min.js")" type="text/javascript"></script>
<script src="@Url.Script("jquery.ui.datepicker.min.js")" type="text/javascript"></script>

@using (@Html.BeginForm("Add", "UserManagement", FormMethod.Post))
{
	@Html.ValidationSummary(false, "There was error while process add user")
	<table>
		<tr>
			<td>@Html.LabelFor(m => m.UserId)</td>
			<td>
				@Html.TextBoxFor(m => m.UserId)
				@Html.ValidationMessageFor(m => m.UserId)
			</td>
		</tr>
		<tr>
			<td>@Html.LabelFor(m => m.Username)</td>
			<td>
				@Html.TextBoxFor(m => m.Username)
				@Html.ValidationMessageFor(m => m.Username)
			</td>
		</tr>
		<tr>
			<td>@Html.LabelFor(m => m.Email)</td>
			<td>
				@Html.TextBoxFor(m => m.Email)
				@Html.ValidationMessageFor(m => m.Email)
			</td>
		</tr>
		<tr>
			<td>@Html.LabelFor(m => m.DateOfBirth)</td>
			<td>
				@Html.DatePicker("DateOfBirth", null,
					new
					{
						dateFormat = "dd/mm/yy",
						displayMonYear = true,
						yearRange = "-100:-3",
						regional = "vi"
					})
			</td>
		</tr>
		<tr>
			<td>@Html.LabelFor(m => m.Sex)</td>
			<td>
				@Html.RadioButton("rdoMale", "M", true) Male
				@Html.RadioButton("rdoMale", "F") Female
			</td>
		</tr>
		<tr>
			<td>@Html.LabelFor(m => m.Address)</td>
			<td>@Html.TextAreaFor(m => m.PhoneNumber)</td>
		</tr>
		<tr>
			<td></td>
			<td>
				<input type="submit" value="Create" />
				<input type="reset" value="Reset" />
			</td>
		</tr>
	</table>   
}